<?php
/**
 * LICENSE
 *
 * This source file is subject to the new BSD license that is bundled
 * with this package in the file license.txt or that can be found at 
 * http://code.google.com/p/billboardce/wiki/License.
 *
 * @package    OAuth_Token
 * @category   Library
 * @license    http://code.google.com/p/billboardce/wiki/License New BSD License
 * @version    SVN: $Id: $
 */

/**
 * @package    Oauth_Token
 * @category   OAuth
 */
class Oauth_Token
{
	// access tokens and request tokens
	public $key;
	public $secret;
	
	/**
	 * key = the token
	 * secret = the token secret
	 */
	public function __construct($key, $secret)
	{
		$this->key = $key;
		$this->secret = $secret;
	}
	
	/**
	 * generates the basic string serialization of a token that a server
	 * would respond to request_token and access_token calls with
	 */
	public function __toString()
	{
		return "oauth_token=" . Oauth_Util::urlencodeRfc3986($this->key) . "&oauth_token_secret=" . Oauth_Util::urlencodeRfc3986($this->secret);
	}
}